<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:f="http://java.sun.com/jsf/core">

	<ui:composition template="/template/template.xhtml">
	
		<ui:define name="content">
			<p:wizard  backLabel="Voltar" nextLabel="Próximo">
			
				<p:tab title="Evento">
		
					<p:panel header="Novo Evento">
					
						<h:messages errorClass="error"/>
						
						<h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">
							<h:outputText value="Evento: *" />
							<p:inputText required="true" label="Nome"
									value="#{eventoBean.evento.nomeEvento}" />
							
							<h:outputText value="Data Inicio: *" />
							<p:calendar effect="explode" value="#{eventoBean.evento.dataEventoInicio}" 
										required="true" label="Data do Evento" pattern="dd/MM/yyyy"/>
							
							<h:outputText value="Data Fim: *" />
							<p:calendar effect="explode" value="#{eventoBean.evento.dataEventoFim}" 
										required="true" label="Data do Evento" pattern="dd/MM/yyyy"/>
							
							<h:outputText value="Vagas: " />
							<p:inputText  label="Vagas"
									value="#{evento.evento.vagas}" />
							
						</h:panelGrid>
					</p:panel>
				</p:tab>
					
				<p:tab title="Confirmar">
					<p:panel header="Confirmação">
					
						<h:panelGrid id="confirmation" columns="6">
							<h:outputText value="Evento: " />
							<h:outputText styleClass="outputLabel"
										value="#{eventoBean.evento.nomeEvento}" />
							
							<h:outputText value="Data Inicio: " />
							<h:outputText  styleClass="outputLabel"
										value="#{eventoBean.evento.dataEventoInicio}"/>
										
							<h:outputText value="Data Inicio: " />
							<h:outputText  styleClass="outputLabel"
										value="#{eventoBean.evento.dataEventoFim}"/>
										
							<h:outputText value="Vagas: " />
							<h:outputText styleClass="outputLabel"
										value="#{eventoBean.evento.vagas}" />

							<h:outputText />
							<h:outputText />
						</h:panelGrid>
						
						<p:commandButton value="Cadastrar" update="growl"		
									actionListener="#{eventoBean.save}"/>
					</p:panel>
				</p:tab>
			</p:wizard> 
		</ui:define>
		
	</ui:composition>
</html>